﻿<div class="top-row ps-3 navbar navbar-dark">
    <div class="container-fluid">
        <img src="assets/influxdata-logo--full--white.svg" class="custom-logo" alt="InfluxData">
        <button title="Navigation menu" class="navbar-toggler" @onclick="ToggleNavMenu">
            <span class="navbar-toggler-icon"></span>
        </button>
    </div>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
    <nav class="flex-column">
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="oi oi-home" aria-hidden="true"></span> Home
            </NavLink>
        </div>
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="device-detail">
                <span class="oi oi-cloud" aria-hidden="true"></span> Device
            </NavLink>
        </div>
        <div class="nav-item px-3">
            <NavLink class="nav-link" href="buckets">
                <span class="oi oi-basket" aria-hidden="true"></span> Buckets
            </NavLink>
        </div>
    </nav>
</div>

@code {
    private bool _collapseNavMenu = true;

    private string? NavMenuCssClass => _collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu()
    {
        _collapseNavMenu = !_collapseNavMenu;
    }

}